﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Operational
{
    public class MockContext : DataContext
    {
        internal MockContext(string directoryfile)
        {
            _log = new Log.LibraryLog(directoryfile);
            
        }

        public void ClearAll()
        {
            ((MockBookRepository)_book).ClearData();
            ((MockAuthorRepository)_author).ClearData();
            ((MockCustomerRepository)_customer).ClearData();
            ((MockTransactionRepository)_transaction).ClearData();
        }

        public override void Initialize()
        {
            _book = new MockBookRepository(this);
            _author = new MockAuthorRepository(this);
            _customer = new MockCustomerRepository(this);
            _transaction = new MockTransactionRepository(this);            
        }
    }
}
